<!--
 * @Author: coman
 * @LastEditors: coman
 * @Date: 2020-06-09 16:54:11
 * @motto: No pain,No gain
 * @LastEditTime: 2020-06-09 17:02:18
--> 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a = [1,-1,0,1.5];
        for(i=0;i<a.length;i++){
            if(a[i]%1===0){
                if(a[i]>0){
                    console.log(a[i]+"该整数大于0")
                }else if(a[i]==0){
                    console.log(a[i]+"该数为0");
                    
                }else{
                    console.log(a[i]+"该整数小于0");
                }
            }else{
                console.log(a[i]+"不是整数");
            }
        }

    </script>
</body>
</html>